object frGURNAL_OF: TfrGURNAL_OF
  Left = 0
  Top = 0
  Caption = #1046#1091#1088#1085#1072#1083' '#1087#1086#1089#1090#1091#1087#1083#1077#1085#1080#1103' '#1080#1079#1074#1077#1097#1077#1085#1080#1081' '#1080' '#1088#1077#1084#1086#1085#1090#1085#1086'-'#1090#1077#1093#1085#1080#1095#1077#1089#1082#1080#1093' '#1079#1072#1103#1074#1086#1082
  ClientHeight = 543
  ClientWidth = 871
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  KeyPreview = True
  OldCreateOrder = False
  Position = poMainFormCenter
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  object pEdit: TPanel
    Left = 0
    Top = 448
    Width = 871
    Height = 95
    Align = alBottom
    TabOrder = 0
    object Label1: TLabel
      Left = 16
      Top = 16
      Width = 265
      Height = 16
      Caption = #1059#1082#1072#1078#1080#1090#1077' '#1076#1072#1090#1091' '#1087#1088#1080#1085#1103#1090#1080#1103'/'#1074#1099#1087#1086#1083#1085#1077#1085#1080#1103' '#1079#1072#1103#1074#1082#1080':'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label2: TLabel
      Left = 16
      Top = 43
      Width = 145
      Height = 16
      Caption = #1048#1090#1086#1075#1086' '#1079#1072' '#1089#1084#1077#1085#1091' '#1087#1088#1080#1085#1103#1090#1086':'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object labKOL_PRIN: TDBText
      Left = 166
      Top = 45
      Width = 65
      Height = 17
      DataField = 'KOL_PRIN'
      DataSource = dsKOL_PRIN
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clNavy
      Font.Height = -12
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label3: TLabel
      Left = 90
      Top = 65
      Width = 70
      Height = 16
      Caption = #1074#1099#1087#1086#1083#1085#1077#1085#1086':'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object labKOL_VIP: TDBText
      Left = 166
      Top = 66
      Width = 65
      Height = 17
      DataField = 'KOL_VIP'
      DataSource = dsKOL_VIP
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clNavy
      Font.Height = -12
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object dtpDAT_SMENI: TDateTimePicker
      Left = 287
      Top = 13
      Width = 114
      Height = 24
      Date = 41144.970923935190000000
      Time = 41144.970923935190000000
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
      TabOrder = 0
    end
    object cxButton1: TcxButton
      Left = 407
      Top = 11
      Width = 130
      Height = 25
      Action = SFORM
      TabOrder = 1
      Glyph.Data = {
        F6040000424DF604000000000000360000002800000015000000130000000100
        180000000000C0040000C40E0000C40E00000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        00000000000000000000000000000000000000000000000000FF000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        00000000000000000000000000000000000000000000000000FF000000000000
        000000000000000000000000000000797D82797D82797D82797D82797D82797D
        82797D82797D82000000000000000000000000000000000000FF000000000000
        000000000000000000797D82797D82929599C0C2C4E1E2E3F7F7F8F7F7F8E1E2
        E3C0C3C4929599797D82797D82000000000000000000000000FF000000000000
        000000000000797D82797D82BCBFC0F9F9F9EFF6EFADD2AE419D4641A548ADDB
        B1F0F9F1F9F9F9BDC0C1797D82797D82000000000000000000FF000000000000
        000000000000797D82BCBFC0F9FCF983B583006901007204007B06008509008E
        0C0D9E1792D895FAFDFABDC0C1797D82000000000000000000FF000000000000
        000000797D82929599F9F9F983B884006700006700007003007906008208008A
        0B03930F0FA0198ED492F9F9F9929599797D82000000000000FF000000000000
        000000797D82C0C3C4EFF6EF006D02006801006600006C02007505007D070084
        09008B0B01900D03930FEFF8F0C0C2C4797D82000000000000FF000000000000
        000000797D82E1E2E3B7D9B9007003006A01006700006801007003007705007D
        0700830900860A00880AADD8B0E1E2E3797D82000000000000FF000000000000
        000000797D82F7F7F876B97A2D8C31056F070069010066000069010070030075
        05007A06007D07007E07419F46F7F7F8797D82000000000000FF000000000000
        000000797D82F7F7F873BA77459D494396451B7B1C056B05006600006801006D
        02007103007404007504419744F7F7F8797D82000000000000FF000000000000
        000000797D82E1E2E3C1E2C4419F46439A47469747439244328633267D261372
        13147415147616258127BEDABFE1E2E3797D82000000000000FF000000000000
        000000797D82C0C3C4F3FAF33DA3443F9D444199454496464694474894494B94
        4B4D954D4F964F519751F4F9F4C0C3C4797D82000000000000FF000000000000
        000000797D82929599F9F9F99FD5A33BA2423D9D433F99444297444495464695
        4749954A4B964CA8CCA9F9F9F9929599797D82000000000000FF000000000000
        000000000000797D82BDC0C1FAFDFB9ED4A239A3413B9E413E9B424099444297
        45449747A6CDA6FBFDFBBDC0C1797D82000000000000000000FF000000000000
        000000000000797D82797D82BDC0C1F9F9F9F2F9F3BFE2C26BB9716EB772C1DF
        C3F3F9F3F9F9F9BDC0C1797D82797D82000000000000000000FF000000000000
        000000000000000000797D82797D82929599C0C3C4E1E2E3F7F7F8F7F7F8E1E2
        E3C0C3C4929599797D82797D82000000000000000000000000FF000000000000
        000000000000000000000000000000797D82797D82797D82797D82797D82797D
        82797D82797D82000000000000000000000000000000000000FF000000000000
        0000000000000000000000000000000000000000000000000000000000000000
        00000000000000000000000000000000000000000000000000FF}
    end
  end
  object pTable: TPanel
    Left = 0
    Top = 0
    Width = 871
    Height = 448
    Align = alClient
    TabOrder = 1
    object sgGURNAL_SEM_OF: TcxGrid
      Left = 1
      Top = 1
      Width = 869
      Height = 446
      Align = alClient
      TabOrder = 0
      LookAndFeel.Kind = lfFlat
      ExplicitLeft = 81
      ExplicitTop = 313
      object sgGURNAL_SEM_OFDBTableView1: TcxGridDBTableView
        NavigatorButtons.ConfirmDelete = False
        DataController.DataSource = dsGURNAL_SEV_OF
        DataController.Summary.DefaultGroupSummaryItems = <>
        DataController.Summary.FooterSummaryItems = <>
        DataController.Summary.SummaryGroups = <>
        OptionsBehavior.IncSearch = True
        OptionsData.Deleting = False
        OptionsData.DeletingConfirmation = False
        OptionsData.Editing = False
        OptionsData.Inserting = False
        OptionsSelection.InvertSelect = False
        OptionsView.CellEndEllipsis = True
        OptionsView.GroupByBox = False
        OptionsView.Indicator = True
        object N: TcxGridDBColumn
          Caption = #8470#1087'/'#1087
          DataBinding.FieldName = 'ID'
          Width = 35
        end
        object TIME: TcxGridDBColumn
          Caption = #1042#1088#1077#1084#1103' '#1087#1086#1089#1090'.'#1079#1072#1103#1074#1082#1080
          DataBinding.FieldName = 'TIME_PRIN'
          Width = 106
        end
        object ADRES: TcxGridDBColumn
          Caption = #1040#1076#1088#1077#1089
          DataBinding.FieldName = 'N_ADRES'
          Width = 199
        end
        object FIO: TcxGridDBColumn
          Caption = #1060#1048#1054' '#1087#1086#1090#1088#1077#1073#1080#1090#1077#1083#1103' '#1075#1072#1079#1072
          DataBinding.FieldName = 'FIO'
          Width = 137
        end
        object NOM: TcxGridDBColumn
          Caption = #1051#1080#1094#1077#1074#1086#1081
          DataBinding.FieldName = 'NOM_ABON'
        end
        object HAR_IZV: TcxGridDBColumn
          Caption = #1061#1072#1088'. '#1080#1079#1074#1077#1097#1077#1085#1080#1103'/'#1079#1072#1103#1074#1082#1080
          DataBinding.FieldName = 'HAR_IZV'
          MinWidth = 40
          Width = 135
        end
        object BRIGADA: TcxGridDBColumn
          Caption = #1054#1090#1087#1088#1072#1074#1083#1077#1085#1072' '#1073#1088#1080#1075#1072#1076#1072
          DataBinding.FieldName = 'KONTROLER'
          Width = 113
        end
        object DATA_PRIN: TcxGridDBColumn
          Caption = #1044#1072#1090#1072' '#1087#1088#1080#1085'. '#1082' '#1080#1089#1087#1086#1083#1085'.'
          DataBinding.FieldName = 'DAT_PRIN_ISPOLN'
          Width = 108
        end
        object TIME_PRIN: TcxGridDBColumn
          Caption = #1042#1088#1077#1084#1103' '#1087#1088#1080#1085'.'#1079#1072#1103#1074#1082#1080' '#1082' '#1080#1089#1087#1086#1083#1085'.'
          DataBinding.FieldName = 'TIME_PRIN_ISPOLN'
          Width = 107
        end
        object HAR_POVREGDEN: TcxGridDBColumn
          Caption = #1061#1072#1088'.'#1087#1086#1074#1088#1077#1078#1076#1077#1085#1080#1103
          Width = 106
        end
        object DATA_VIP: TcxGridDBColumn
          Caption = #1044#1072#1090#1072' '#1074#1099#1087#1086#1083#1085#1077#1085#1080#1103
          DataBinding.FieldName = 'DAT_POS'
          Width = 101
        end
        object TIME_VIP: TcxGridDBColumn
          Caption = #1042#1088#1077#1084#1103' '#1074#1099#1087#1086#1083#1085#1077#1085#1080#1103
          DataBinding.FieldName = 'TIME_POS'
          Width = 103
        end
        object VIP_RABOTA: TcxGridDBColumn
          Caption = #1063#1090#1086' '#1089#1076#1077#1083#1072#1085#1086'('#1074#1099#1087'.'#1088#1072#1073#1086#1090#1072')'
          DataBinding.FieldName = 'WHAT_DONE'
          Width = 138
        end
        object PRIM: TcxGridDBColumn
          Caption = #1055#1088#1080#1084#1077#1095#1072#1085#1080#1077
          DataBinding.FieldName = 'PRIM'
          Width = 98
        end
      end
      object sgGURNAL_SEM_OFLevel1: TcxGridLevel
        GridView = sgGURNAL_SEM_OFDBTableView1
      end
    end
  end
  object ActionList1: TActionList
    Left = 760
    Top = 112
    object ESC: TAction
      Caption = 'ESC'
      ShortCut = 27
      OnExecute = ESCExecute
    end
    object SFORM: TAction
      Caption = #1057#1092#1086#1088#1084#1080#1088#1086#1074#1072#1090#1100'(F2)'
      ShortCut = 113
      OnExecute = SFORMExecute
    end
  end
  object dsetGURNAL_SEV_OF: TIBCQuery
    Connection = dmOne.IBDBOne
    SQL.Strings = (
      
        'execute block (dat date = :dat) returns(ID integer,KOD integer,N' +
        'OM_ABON integer,FIO varchar(40),PUNKT varchar(30),'
      
        'UL char(35),DOM varchar(8),DOM2 varchar(1),KORPUS integer,KB var' +
        'char(3),DAT_PRIN date,NA_DATU date,TIP_JOB char(35),'
      
        'VID_JOB char(35),JOB char(50),FIO_SOTR char(30),TIP varchar(60),' +
        'KOD_OP integer,DAT_WOD date,DAT_POS date,PRITH_NEVIP char(40),'
      
        'PHONE char(20),PRIM char(40),NAIN_DO_POSLE varchar(35),NAIM_STAT' +
        'US varchar(35),KONTROLER varchar(50),NA_VREMIA char(20),'
      
        'KOD_TIP integer,KOD_PRIBORA integer,K_SOTR integer,K_TIP_JOB int' +
        'eger,SUMMA decimal(15,2),PRIM2 char(40),DAT_PRIN_ISPOLN date,'
      
        'TIME_PRIN_ISPOLN time,VIP_TIP_JOB integer,VIP_JOB integer,N_VIP_' +
        'TIP_JOB char(20),N_VIP_JOB char(50),WHAT_DONE char(70),'
      
        'TIME_PRIN char(15),N_ADRES char(100),HAR_IZV char(100),TIME_POS ' +
        'char(15))'
      'as'
      'declare variable DO_POSLE integer;'
      'declare variable NA_TIME char(5);'
      'declare variable STATUS integer;'
      'begin'
      'ID=1;'
      'for select F.KOD, F.NOM_ABON, SA.FIO,'
      
        '(SP.NAI_PUNKT||'#39' '#39'|| VU.NAI_VU||'#39#39'||SU.NAI_UL||'#39' '#1076#1086#1084' '#39'||SA.DOM||' +
        #39' '#39'||coalesce(SA.DOM2,'#39#39')||'#39' ,'#1082#1074#39'|| SA.KB) AS ADRES,'
      
        'F.DAT_PRIN, F.NA_DATU, F.DO_POSLE, F.NA_TIME, STJ.NAIN AS TIP_JO' +
        'B, SVJ.NAIM AS VID_JOB,'
      
        'SJ.NAIM AS JOB, SOTR.FIO AS FIO_SOTR, STP.NAIM AS TIP, F.STATUS,' +
        ' F.KOD_OP, F.DAT_WOD, F.DAT_POS, F.PRITH_NEVIP,'
      'F.PHONE, F.PRIM, U.NAIM AS KONTR,'
      
        'F.TIP_PRIB AS KOD_TIP, F.KOD_PRIB AS KOD_PRIBORA, F.K_SOTR, F.TI' +
        'P_JOB AS K_TIP_JOB,F.SUMMA,F.PRIM2,'
      
        'F.dat_prin_ispoln,F.time_prin_ispoln, f.vip_tip_job, f.vip_job, ' +
        'f.time_prin, f.time_pos'
      
        'from F_ZAJVKA F, SPR_ABON SA,SP_PUNKT SP,SP_VU VU, SP_UL SU,SPR_' +
        'TIP_JOB STJ,SPR_VID_JOB SVJ, SPR_JOB SJ,'
      'SPR_SOTR_VDGO SOTR, SP_TIP_PRIB STP, USERS U'
      'where F.NOM_ABON=SA.NOM_ABON'
      'AND SA.KOD_PUNKT=SP.KOD_PUNKT'
      'AND VU.KOD_VU=SA.KOD_VU'
      'AND SA.KOD_UL=SU.KOD_UL'
      'AND F.TIP_JOB=STJ.KOD'
      'AND F.VID_JOB=SVJ.KOD'
      'AND F.JOB=SJ.KOD'
      'AND F.K_SOTR=SOTR.KOD'
      'AND F.TIP_PRIB=STP.KOD'
      'AND F.KOD_OP=U.KOD_OP'
      'AND F.DAT_PRIN=:DAT'
      
        'into :KOD, :NOM_ABON,:fio,:n_adres, :DAT_PRIN, :NA_DATU,:DO_POSL' +
        'E, :NA_TIME, :TIP_JOB, :VID_JOB,'
      
        ':JOB, :FIO_SOTR, :TIP, :STATUS, :KOD_OP, :DAT_WOD,:DAT_POS, :PRI' +
        'TH_NEVIP,:PHONE,:PRIM,:KONTROLER, :KOD_TIP,:KOD_PRIBORA, :K_SOTR' +
        ','
      
        ':K_TIP_JOB,:SUMMA,:PRIM2,:DAT_PRIN_ISPOLN,:TIME_PRIN_ISPOLN,:VIP' +
        '_TIP_JOB,:VIP_JOB,:TIME_PRIN,:TIME_POS'
      'do begin'
      
        'select K.NAIM_KOD from KLSFCT K where K.KOD=20 AND K.KOD_HC=:DO_' +
        'POSLE into :NAIN_DO_POSLE;  --'#1076#1086' '#1080#1083#1080' '#1087#1086#1089#1083#1077' '#1091#1082#1072#1079#1072#1085#1085#1086#1075#1086' '#1074#1088#1077#1084#1077#1085#1080
      
        'select K.NAIM_KOD from KLSFCT K where K.KOD=18 AND K.KOD_HC=:STA' +
        'TUS into :NAIM_STATUS;  --'#1089#1090#1072#1090#1091#1089' '#1079#1072#1103#1074#1082#1080'('#1087#1088#1080#1085#1103#1090#1072', '#1074#1099#1087#1086#1083#1085#1103#1077#1090#1089#1103' '#1080' '#1090 +
        '.'#1076')'
      'NA_VREMIA=NAIN_DO_POSLE ||'#39' '#39'||NA_TIME;'
      
        'HAR_IZV=TRIM(TIP_JOB)||'#39' '#39'||TRIM(JOB)||'#39','#1085#1072' '#39'||TRIM(NA_DATU)||'#39' ' +
        #39'||TRIM(NAIN_DO_POSLE)||'#39' '#39'||TRIM(NA_TIME);'
      
        'select s.nain from spr_tip_job s where s.kod=:vip_tip_job into :' +
        'n_vip_tip_job;'
      
        'select s.naim from spr_job s where s.kod=:vip_job into :N_VIP_JO' +
        'B;'
      'WHAT_DONE=n_vip_tip_job||'#39' '#39'||N_VIP_JOB;'
      'SUSPEND;'
      'ID=ID+1;'
      'end'
      'end')
    Left = 664
    Top = 47
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'DAT'
      end>
  end
  object dsetKOL_PRIN: TIBCQuery
    Connection = dmOne.IBDBOne
    SQL.Strings = (
      'select count(F.KOD) as KOL_PRIN'
      
        'from F_ZAJVKA F, SPR_ABON SA,SP_PUNKT SP,SP_VU VU, SP_UL SU,SPR_' +
        'TIP_JOB STJ,SPR_VID_JOB SVJ, SPR_JOB SJ,'
      'SPR_SOTR_VDGO SOTR, SP_TIP_PRIB STP, USERS U'
      'where F.NOM_ABON=SA.NOM_ABON'
      'AND SA.KOD_PUNKT=SP.KOD_PUNKT'
      'AND VU.KOD_VU=SA.KOD_VU'
      'AND SA.KOD_UL=SU.KOD_UL'
      'AND F.TIP_JOB=STJ.KOD'
      'AND F.VID_JOB=SVJ.KOD'
      'AND F.JOB=SJ.KOD'
      'AND F.K_SOTR=SOTR.KOD'
      'AND F.TIP_PRIB=STP.KOD'
      'AND F.KOD_OP=U.KOD_OP'
      'AND F.dat_prin=:DAT')
    Left = 664
    Top = 80
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'DAT'
      end>
  end
  object dsetKOL_VIP: TIBCQuery
    Connection = dmOne.IBDBOne
    SQL.Strings = (
      'select count(F.KOD) as KOL_VIP'
      
        'from F_ZAJVKA F, SPR_ABON SA,SP_PUNKT SP,SP_VU VU, SP_UL SU,SPR_' +
        'TIP_JOB STJ,SPR_VID_JOB SVJ, SPR_JOB SJ,'
      'SPR_SOTR_VDGO SOTR, SP_TIP_PRIB STP, USERS U'
      'where F.NOM_ABON=SA.NOM_ABON'
      'AND SA.KOD_PUNKT=SP.KOD_PUNKT'
      'AND VU.KOD_VU=SA.KOD_VU'
      'AND SA.KOD_UL=SU.KOD_UL'
      'AND F.TIP_JOB=STJ.KOD'
      'AND F.VID_JOB=SVJ.KOD'
      'AND F.JOB=SJ.KOD'
      'AND F.K_SOTR=SOTR.KOD'
      'AND F.TIP_PRIB=STP.KOD'
      'AND F.KOD_OP=U.KOD_OP'
      'AND F.dat_pos=:DAT')
    Left = 664
    Top = 112
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'DAT'
      end>
  end
  object dsGURNAL_SEV_OF: TIBCDataSource
    DataSet = dsetGURNAL_SEV_OF
    Left = 695
    Top = 47
  end
  object dsKOL_PRIN: TIBCDataSource
    DataSet = dsetKOL_PRIN
    Left = 696
    Top = 80
  end
  object dsKOL_VIP: TIBCDataSource
    DataSet = dsetKOL_VIP
    Left = 696
    Top = 112
  end
end
